<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>Document</title>
    </head>
    <body>
        <textarea id="test" style="width:100%;height:600px;">


        </textarea>
        <button onclick="zh()">转换</button>
        <script>
        function zh(){
        var str = document.getElementById('test').value;

       str = str.replace(/\\u([^\\]{4,4})/g,function(a,b){
           console.log(a,b)
            return unescape('%u' +b )
        })
    document.getElementById('test').value = str;      
}
        </script>
    </body>
</html>